// 基础样式
html,
body {
  height: 100%;
  margin: 0;
  padding: 0;
  -moz-osx-font-smoothing: grayscale;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial,
    'Noto Sans', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol',
    'Noto Color Emoji';
}

// 布局类
.flex {
  display: flex;
}

.flex-column {
  flex-direction: column;
}

.flex-1 {
  flex: 1;
}

.items-center {
  align-items: center;
}

.justify-between {
  justify-content: space-between;
}

// 间距类
.m-2 {
  margin: 8px;
}

.mt-2 {
  margin-top: 8px;
}

.mb-2 {
  margin-bottom: 8px;
}

.ml-2 {
  margin-left: 8px;
}

.mr-2 {
  margin-right: 8px;
}

.p-2 {
  padding: 8px;
}

// 文本类
.text-center {
  text-align: center;
}

.text-right {
  text-align: right;
}

.text-left {
  text-align: left;
}

// 颜色类
.text-primary {
  color: var(--el-color-primary);
}

.text-success {
  color: var(--el-color-success);
}

.text-warning {
  color: var(--el-color-warning);
}

.text-danger {
  color: var(--el-color-danger);
}

.text-info {
  color: var(--el-color-info);
}

// 边框类
.border {
  border: 1px solid var(--el-border-color);
}

.rounded {
  border-radius: 4px;
}

// 阴影类
.shadow {
  box-shadow: var(--el-box-shadow-light);
}

// 鼠标样式
.cursor-pointer {
  cursor: pointer;
}

// 溢出处理
.overflow-hidden {
  overflow: hidden;
}

.text-ellipsis {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

// 响应式布局
.hidden {
  display: none;
}

@media screen and (max-width: 768px) {
  .hidden-sm {
    display: none;
  }
}

@media screen and (max-width: 992px) {
  .hidden-md {
    display: none;
  }
}

@media screen and (max-width: 1200px) {
  .hidden-lg {
    display: none;
  }
}

/* 表格通用样式 */
:deep(.el-table) {
  --el-table-border-color: #e4e7ed;
  --el-table-header-bg-color: #f5f7fa;
  
  .el-table__header th {
    background-color: var(--el-table-header-bg-color);
    color: #606266;
    font-weight: 500;
    height: 44px;
  }
  
  .el-table__row td {
    padding: 12px 0;
  }
}

/* 卡片通用样式 */
.el-card {
  border: none !important;
  box-shadow: none !important;
  margin: 0 !important;
  background-color: #fff;
}

.el-card :deep(.el-card__body) {
  padding: 0;
  overflow: hidden;
  background-color: #fff;
}

/* 移除卡片的内边距 */
:deep(.el-card__header) {
  padding: 0;
  border-bottom: none;
}

/* 页面标题样式 */
:deep(.page-header) {
  height: 56px;
  line-height: 56px;
  padding: 0 20px;
  border-bottom: 1px solid #e2e8f0;
  background: #fff;
  position: sticky;
  top: 0;
  z-index: 2;
}

:deep(.page-header .title) {
  font-size: 16px;
  font-weight: 500;
  color: #1e293b;
  text-align: left;
  flex: 1;
}

/* 移动端适配 - 非功能区 */
@media screen and (max-width: 768px) {
  :deep(.el-dialog) {
    width: 90% !important;
    margin: 0 auto;
  }

  .search-bar {
    position: sticky;
    top: 0;
    z-index: 10;
    background: #fff;
    margin: 0;
    padding: 8px;
    border-bottom: 1px solid #ebeef5;
  }
} 

/* 页面容器样式 */
.el-card {
  display: flex;
  flex-direction: column;
  height: calc(100vh - 84px);
  
  :deep(.el-card__body) {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: auto;
  }
}

/* 分页器固定底部 */
:deep(.base-pagination) {
  position: sticky;
  bottom: 0;
  z-index: 10;
  margin-top: auto;
  box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.05);
} 

/* 权限模板下拉框样式 */
.el-select__wrapper.el-tooltip__trigger {
  width: 500px !important;
}

.el-select-dropdown.el-popper {
  min-width: 500px !important;
  max-width: none !important;
  width: auto !important;
} 